﻿namespace ScrumFactory.Composition
{
    using System;

    public enum ScrumFactoryEvent {
        ShowViewModel,
        CloseViewModel,           
        ViewProjectDetails,       
        BacklogItemGroupsLoaded,
        BacklogItemsLoaded,         
        BacklogItemsChanged,
        BacklogItemDeleted,
        BurndownShouldRefresh,
        ProjectStatusChanged,
        ProjectDetailsChanged,
        ProjectRolesChanged,
        ProjectRoleChanged,        
        ProjectMembersChanged,        
        RoleHourCostsChanged,
        SprintsLoaded,
        SprintsDateChanged,  
        SprintAdded,
        SprintsShifted,      
        ProjectCreated,
        ActiveSizesChanged,        
        ShowLogin,
        ShowProfile,
        ShowProjectTab,
        ShowProjectTeam,
        ShowProjectDetails,
        ShowItemDetail,
        ShowReport,
        ShowUserTasksSelector,
        ShowFinishTaskDialog,
        ShowTasksForItem,
        ShowTaskDetail,
        ShowJoinDialog,
        ShowOwnersList,
        ShellStarted,
        Signing,
        SignedMemberChanged,
        TaskTrackChanged,
        TasksLoaded,
        TaskChanged,
        ServerArgOnInit,
        ProjectArgOnInit,
        TaskArgOnInit,
        ApplicationWhentBackground,
        ApplicationWhentForeground
    }

    public interface IEventAggregator
    {

        void UnSubscribeAll(object obj);
        void Subscribe(string eventName, Action action);
        void Subscribe(string eventName, Action action, int priority);
        void Subscribe<TData>(string eventName, Action<TData> action, int priority);
        void Subscribe<TData>(string eventName, Action<TData> action);
        void Publish<TData>(string eventName, TData data);
        void Publish(string eventName);

        
        void Subscribe(ScrumFactoryEvent eventName, Action action);
        void Subscribe(ScrumFactoryEvent eventName, Action action, int priority);
        void Subscribe<TData>(ScrumFactoryEvent e, Action<TData> action, int priority);
        void Subscribe<TData>(ScrumFactoryEvent eventName, Action<TData> action);
        void Publish<TData>(ScrumFactoryEvent eventName, TData data);
        void Publish(ScrumFactoryEvent eventName);

        
    }

   


}
